#include<iostream>
#include<string>
using namespace std;
int main ()
{char ch1[10],ch2[200],ch3[10],ch4[10];
 char source[15] = "outofinput";
 while(gets(ch1)&&strcmp(ch1,source)!=0)
 {
  gets(ch2);
  for(int i=0;i<200;i++)
  {if(ch2[i]>='A'&&ch2[i]<='E')  ch2[i]+=21;
   else if(ch2[i]>'E'&&ch2[i]<='Z') ch2[i]-=5;
   }
  gets(ch3);
  cout<<ch2<<endl;
 }
 system("pause");
 return 0;
}

